﻿using SanXiao.Game.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SanXiao.Game.GameCenter.SpecialEffects
{
    public class SpecialEffects2: SpecialEffectsObject
    {
        static readonly ImageObject[] _images;
        static SpecialEffects2()
        {
            Bitmap[] bitmaps = { Properties.Resources._1053_1, Properties.Resources._1053_2, Properties.Resources._1053_3, Properties.Resources._1053_4, Properties.Resources._1053_5, Properties.Resources._1053_6, Properties.Resources._1053_7, Properties.Resources._1053_8, Properties.Resources._1053_9, Properties.Resources._1053_10};
            _images = ToImageObjects(bitmaps);
        }
        public SpecialEffects2(Size size)
            : base(GameType.SpecialEffects1, size, _images)
        {

        }
        //public override void Draw(Graphics g)
        //{
        //    if (_imageIndex == -1) return;

        //    var image = _images[_imageIndex];
        //    IntPtr hdc = g.GetHdc();
        //    GDI32.DrawImageTransparenc(hdc, image.BitmapPtr, Location.X- Size.Width/2, Location.Y- Size.Height/2, image.Width, image.Height, Size.Width, Size.Height);
        //    g.ReleaseHdc(hdc);
        //    if (++_imageIndex >= _images.Length)
        //    {
        //        _imageIndex = -1;
        //        DrawCompleteCallback?.Invoke(this);
        //    }
        //}
    }
}
